﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using TfsConnection = TrackMe.Apps.Integration.TFS.TfsConnection;

namespace AcceptanceTests
{
	[TestClass]
	public class TfsServerTest
	{
    	public TestContext TestContext { get; set; }
		const string uri = "https://tfsapp.actsoft.com:444/tfs/";

		[TestMethod]
		public void QueriesTest()
		{
//			const string uri = "https://tfs.codeplex.com/tfs/tfs12";
			var workItems = TfsConnection.WorkItems(DateTime.Now.AddDays(-1));
			Assert.AreEqual(5, workItems.Count);
		}


		[TestMethod]
		public void Test_Fields()
		{
			var target = new TfsConnection(uri);
			target.UpdateWorkload(7071, TimeSpan.FromHours(11.5));
		}

		private static TfsConnection TfsConnection
		{
			get { return new TfsConnection(uri); }
		}

		[TestMethod]
		public void Test1()
		{
			var target = TfsConnection;
		}
	}
}
